﻿/*******************************************************************************
 * Copyright © 2016-2020 北京网非科技有限公司 版权所有
 * Author: 北京网非科技有限公司
 * Description: 网非快速开发平台NET
 * Website：http://www.wfdot.com
*********************************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace CubicFWNet.Data.SystemSecurity.Model
{
    [Table("LogInLog")]
    public class LogInLog
    {

        [Key]
        public System.Guid Id { get; set; }

        [Index("IX_Time_LogInLog", IsClustered = false)]
        [Index("IX_Time-FamilyName_LogInLog", IsClustered = false,  Order = 1)]
        [DisplayName("时间")]
        public System.DateTime Time { get; set; }

        public System.Guid UserId { get; set; }
        [DisplayName("账号")]
        [Required]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar")]
        public string UserName { get; set; }

        [Index("IX_Time-FamilyName_LogInLog", IsClustered = false, Order = 2)]
        [DisplayName("姓名")]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar")]
        public string FamilyName { get; set; }
        /// <summary>
        /// 登录  登出  登录失败 密码错误
        /// </summary>
        [DisplayName("操作")]
        [Required]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar")]
        public string Type { get; set; }

        [DisplayName("IP地址")]
        [MaxLength(50)]
        [Column(TypeName = "varchar")]
        public string IPAddress { get; set; }

        [MaxLength(100)]
        [Column(TypeName = "varchar")]
        public string IPAddressName { get; set; }

        [DisplayName("备注")]
        [MaxLength(200)]
        [Column(TypeName = "nvarchar")]
        public string Memo { get; set; }
    }
}
